<!doctype html>
<html class="no-js" lang="">
{template '_headerv2'}
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link href="apple-touch-icon.png" rel="apple-touch-icon">
    <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/framework7/1.6.5/css/framework7.ios.min.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/framework7/1.6.5/css/framework7.ios.colors.min.css" rel="stylesheet">
    <link href="{MODULE_URL}template/mobile/cooperation/example/css/style.css" rel="stylesheet">
</head>

<body>
<div class="views">
    <div class="view view-main">
        <!-- navbar -->
        <!-- <div class="navbar">
        <div class="navbar-inner" data-page="home">
            <div class="left"></div>
            <div class="center"></div>
            <div class="right"></div>
        </div>
        </div> -->
        <!-- Pages -->
        {if $operation == 'index'}
        <div class="pages">
            <div class="page" data-page="home">
                <div class="page-content hide-tabbar-on-scroll">
                    <div class="list-block">
                        <ul>
                            <li>
                                <div class="item-content">
                                    <div class="item-inner">
                                        <div class="item-title label">姓名
                                            <font class="color-red">*</font>
                                        </div>
                                        <div class="item-input">
                                            <input type="text" placeholder="姓名" name="nickname">
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="item-content">
                                    <div class="item-inner">
                                        <div class="item-title label">手机号码
                                            <font class="color-red">*</font>
                                        </div>
                                        <div class="item-input">
                                            <input type="tel" placeholder="手机号" name="mobile">
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="item-content">
                                    <div class="item-inner">
                                        <div class="item-title label">所在地区
                                            <font class="color-red">*</font>
                                        </div>
                                        <div class="item-input">
                                            <input type="text" placeholder="请选择城市" readonly id="location"
                                                   name="location">
                                        </div>
                                    </div>
                                </div>
                            </li>

                        </ul>
                    </div>
                    <!-- /.list-block -->
                    <div class="content-block">
                        <span class="button button-big button-fill" onclick="ajaxSubmit();">提交审核</span>
                    </div>
                </div>
                <!-- /.page-content -->
            </div>
            <!-- /.page -->
        </div>
        <!-- /.pages -->
        {elseif $op == 'data'}
        <div class="pages">
            <div class="page" data-page="home">
                <div class="page-content hide-tabbar-on-scroll">
                    <div class="list-block">
                        <ul>
                            <li>
                                <div class="item-content">
                                    <div class="item-inner">
                                        <div class="item-title label">姓名
                                            <font class="color-red">*</font>
                                        </div>
                                        <div class="item-input">
                                            <input type="text" placeholder="姓名" name="nickname" value="{$data['nickname']}">
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="item-content">
                                    <div class="item-inner">
                                        <div class="item-title label">手机号码
                                            <font class="color-red">*</font>
                                        </div>
                                        <div class="item-input">
                                            <input type="tel" placeholder="手机号" name="mobile" value="{$data['mobile']}">
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="item-content">
                                    <div class="item-inner">
                                        <div class="item-title label">所在地区
                                            <font class="color-red">*</font>
                                        </div>
                                        <div class="item-input">
                                            <input type="tel" placeholder="手机号" name="mobile" value="{$data['location_name']}">
                                        </div>
                                    </div>
                                </div>
                            </li>

                        </ul>
                    </div>
                    <!-- /.list-block -->
                    <div class="content-block">
                        <span class="button button-big button-fill" style="background-color: #999">审核中</span>
                        <p style="color:#999;width:100%,text-align:center;font-size:12;">耐心等候，我们将在7个工作日内审核完毕</p>
                    </div>
                </div>
                <!-- /.page-content -->
            </div>
            <!-- /.page -->
        </div>
        {/if}
    </div>
    <!-- /.view -->
</div>
<!-- /.views -->
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script src="https://cdn.bootcss.com/framework7/1.6.5/js/framework7.min.js"></script>
<script src="{MODULE_URL}template/mobile/cooperation/example/js/regionsObject2.js"></script>
<script src="{MODULE_URL}template/mobile/cooperation/example/js/cityPicker.js"></script>
</body>
<script>
    function ajaxSubmit() {
        var mobile = $('input[name="mobile"]').val();
        var nickname = $('input[name="nickname"]').val();
        var location = $('input[name="location"]').val();

        $.ajax({
            url: 'index.php?i=3&c=entry&do=cooperation&op=ajax&m=fy_lessonv2',
            type: "POST",//请求方式
            dataType: 'json',
            data: {
                mobile: mobile,
                nickname: nickname,
                location: location,
            },
            success: function (data) {
                if (data.code == 200) {
                    alert('信息提交成功');
                    window.location.href = "./index.php?i=3&c=entry&do=cooperation&op=index&m=fy_lessonv2";
                }
                alert(data.msg);
            }
        })
    }
</script>

</html>
